﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using tinyweb.framework;
using tinyweb.viewengine.spark;
using Bepo.Handlers.API;

namespace Bepo.Handlers
{
    public class BusinessmodelsHandler
    {
        public IResult Get()
        {
            return View.Spark("Views/BusinessModels/index.spark", "../Layout/Application.spark");
        }
    }

    public class BusinessmodelsNewHandler
    {
        public IResult Get()
        {
            return View.Spark("Views/BusinessModels/partials/new.spark");
        }
    }

    //public class BusinessmodelsEditHandler
    //{
    //    Route route = new Route("BusinessModels/edit/{id}", new { id = -1 });

    //    public IResult Get(int id)
    //    {
    //        if(id == -1)
    //            return View.Spark("Views/BusinessModels/partials/new.spark");

    //        var model = ApiBusinessmodelHandler.Entities.First(x => x.Id == id);
    //        return View.Spark(model, "Views/BusinessModels/partials/edit.spark");

    //    }
    //}
}